<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      html,
      body {
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        background-color: #2b3a42;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .wekpack-logo {
        width: 100%;
        height: 200px;
        position: relative;
      }
      ul {
        margin: 0;
        padding: 0;
        list-style: none;
      }
      .cube-inner {
        position: absolute;
        left: 50%;
        top: 50%;
        /* 不要使用transform，会改变坐标原点 */
        margin: -25px 0 0 -25px;
        width: 50px;
        height: 50px;

        /* 启用3d空间 */
        transform-style: preserve-3d;
        transform: rotateX(-33.5deg) rotateY(45deg);
        animation: loopInner 3s ease-in-out;
      }

      @keyframes loopInner {
        0% {
          transform: rotateX(-33.5deg) rotateY(45deg);
        }
        50%,
        100% {
          transform: rotateX(-33.5deg) rotateY(-315deg);
        }
      }
      .cube-inner li {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #175d96;
        border: 1px solid white;
      }

      .cube-inner .top {
        transform: rotateX(90deg) translateZ(25px);
      }

      .cube-inner .bottom {
        transform: rotateX(-90deg) translateZ(25px);
      }

      .cube-inner .front {
        transform: rotateX(0deg) translateZ(25px);
      }

      .cube-inner .back {
        transform: rotateX(180deg) translateZ(25px);
      }

      .cube-inner .left {
        transform: rotateX(-90deg) translateZ(25px);
      }

      .cube-inner .right {
        transform: rotateY(90deg) translateZ(25px);
      }

      .cube-outer {
        position: absolute;
        left: 50%;
        top: 50%;
        /* 不要使用transform，会改变坐标原点 */
        margin: -50px 0 0 -50px;
        width: 100px;
        height: 100px;

        /* 启用3d空间 */
        transform-style: preserve-3d;
        transform: rotateX(-33.5deg) rotateY(45deg);
        animation: loopOuter 3s ease-in;
      }

      @keyframes loopOuter {
        0% {
          transform: rotateX(-33.5deg) rotateY(45deg);
        }

        50%,
        100% {
          transform: rotateX(-33.5deg) rotateY(405deg);
        }
      }

      .cube-outer li {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(141, 214, 249, 0.5);
        border: 1px solid white;
      }

      .cube-outer .top {
        transform: rotateX(90deg) translateZ(50px);
      }

      .cube-outer .bottom {
        transform: rotateX(-90deg) translateZ(50px);
      }

      .cube-outer .front {
        transform: rotateX(0deg) translateZ(50px);
      }

      .cube-outer .back {
        transform: rotateX(180deg) translateZ(50px);
      }

      .cube-outer .left {
        transform: rotateX(-90deg) translateZ(50px);
      }

      .cube-outer .right {
        transform: rotateY(90deg) translateZ(50px);
      }
    </style>
  </head>
  <body>
    <div class="wekpack-logo">
      <ul class="cube-inner">
        <li class="top"></li>
        <li class="bottom"></li>
        <li class="front"></li>
        <li class="back"></li>
        <li class="left"></li>
        <li class="right"></li>
      </ul>

      <ul class="cube-outer">
        <li class="top"></li>
        <li class="bottom"></li>
        <li class="front"></li>
        <li class="back"></li>
        <li class="left"></li>
        <li class="right"></li>
      </ul>
    </div>
  </body>
</html>
